package com.itheima.controller;

import com.itheima.pojo.Account;
import com.itheima.service.AccountService;

/**
 * @author zhangyan
 * @date 2021/1/31 9:45
 * 控制器:servlet
 */
public class AccountController {

    private AccountService accountService;

    public void setAccountService(AccountService accountService) {
        this.accountService = accountService;
    }

    public void save(Account account) {

        accountService.save(account);
    }
}

/*
    即使我们把AccountServiceImpl删除掉，AccountController也不会编译报错，
    因为AccountController本来就和AccountServiceImpl没有直接关系，
    也就起到了解耦的效果
*/